package com.hushao.lims.weblims.service;

import com.hushao.lims.weblims.domain.ConsumableApply;
import com.hushao.lims.weblims.domain.ConsumableInfo;
import com.hushao.lims.weblims.domain.TeacherInfo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * @author 930588706
 * @date 18/1/24
 * 申请耗材
 */
public interface ConsumableApplyService {
    /**
     * 根据耗材名称，状态，模糊查询申请耗材列表(分页)
     * @param consumableName
     * @param state
     * @param pageable
     * @return
     */
    Page<ConsumableApply> listConsumableApplyByNameLikeAndStateLike(String consumableName, String state, Pageable pageable);

    /**
     * 根据耗材，数量，状态，查询申请耗材信息
     * @param consumableInfo
     * @param consumableCount
     * @param state
     * @return
     */
    List<ConsumableApply> listConsumableAndCountAndState(ConsumableInfo consumableInfo, Integer consumableCount, String state);

    /**
     *  修改申请耗材表
     * @param consumableApply
     * @return
     * @throws Exception
     */
    ConsumableApply update(ConsumableApply consumableApply) throws Exception;

    /**
     * 审核此耗材申请
     * @param consumableApplyId
     * @param state
     * @param teacher
     */
    void audit(Long consumableApplyId, String state, TeacherInfo teacher)throws Exception;
}
